import mandrill


def send_mail(confor_link, from_email, to_email):
    try:
        mandrill_client = mandrill.Mandrill('z1xGmUJ8ZL_aUnF6GgSotA')
        message = {
            'html': 'go to this <a href="' + confor_link + '">link</a>',
            'subject': 'confirm yourself',
            'from_email': from_email,
            'to': [{
                'email': to_email
            }],
            'important': False,
        }
        result = mandrill_client.messages.send(message=message)
        result = result[0]
        if result['status'] == 'rejected' or result['status'] == 'invalid':
            return False
        return True

    except:
        return False
